package com.changgou.common.model.response.file;

import com.changgou.common.model.response.ResultCode;
import lombok.ToString;

@ToString
public enum FileCode implements ResultCode {
    FILE_INVALID_PARAM(false,10003,"文件格式有误！"),
    File_SUCCESS(true,10000,"操作成功！"),
    File_FAIL(false,11111,"操作失败！"),
    File_UNAUTHENTICATED(false,10001,"此操作需要登陆系统！"),
    SERVER_ERROR(false,99999,"抱歉，系统繁忙，请稍后重试！");
//    private static ImmutableMap<Integer, CommonCode> codes ;
    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;
    private FileCode(boolean success, int code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }
    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }


}
